#include "../include/Resample.hpp"
#include "../include/utils.hpp"
#include <iostream>
#include <armadillo>

const int M=100;

using namespace std;
using namespace arma;

int main()
{
	int _M=100;
	mat X(_M,1);
	double *W=new double[_M];
	for(int i=0;i<_M;i++)
	{
		X(i,0)=i;
		W[i]=i;
	}
	W[99]=1000;
	mat v=growingvect(_M);
	double *w=new double[_M];
	//*w=*W;
	delete[] w;


	for(int i=0;i<_M;i++){
		 w[i]=W[i];
	}

	Resample::Multinomial R;
	//Resample::Resample<Resample::SysResample> Res(R);
	R(&_M,w,v);
	Arangemat(X,v);
	cout << _M;
	cout << "//";
	cout << X;
	cout << "//";
	delete[] W;
}
